//
//  ZMXIBView.swift
//  TravelForUser
//
//  Created by Rowling on 2020/9/2.
//  Copyright © 2020 智蚂优服. All rights reserved.
//

import UIKit

class ZMXIBView: LemonBaseView {
    @IBInspectable var view : UIView!
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setView()
        awakeFromNib()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        setView()
    }
    
    func setView() {
        let nibStr = "\(classForCoder)"
        view = Bundle.main.loadNibNamed(nibStr, owner: self, options: nil)?.first as? UIView
        self.addSubview(view)
    }

    override func layoutSubviews() {
        super.layoutSubviews()
        view.frame = bounds
    }
}

